﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <#include   "../common/header.ftl">
    <script>
        $(function () {
           $('.btn-reload').click(function () {
               var url = $(this).data('url');
               $.messager.confirm('温馨提示','加载时间有点长,确定吗?',function (data) {
                   //ajax请求 表单提交要提交数据  ajax异步提交是非表单提交
                   $.get(url,function (data) {
                       handleResult(data);
                   })
               })
           });
        });
    </script>
</head>
<body>

<div class="container " style="margin-top: 20px">
    <#include   "../common/top.ftl">
    <div class="row">
        <div class="col-sm-3">
            <#assign menu="permission"/>
            <#include   "../common/menu.ftl">
        </div>
        <div class="col-sm-9">
            <div class="row">
                <div class="col-sm-12">
                    <h1 class="page-head-line">权限管理</h1>
                </div>
            </div>
            <!--高级查询--->
            <form class="form-inline" id="searchForm" action="/permission/list.do" method="post">
                <input type="hidden" name="currentPage" id="currentPage" value="1">
                <a href="javascript:;" class="btn btn-success btn-reload" data-url="/permission/reload.do">
                    <span class="glyphicon glyphicon-refresh"></span> 重新加载权限
                </a>
            </form>

            <table class="table table-striped table-hover">
                <tr>
                    <th>编号</th>
                    <th>权限名称</th>
                    <th>权限表达式</th>
                    <th>操作</th>
                </tr>
                    <#list  pageInfo.list as entity>
                    <tr>
                        <td>${entity_index + 1}</td>
                        <td>${entity.name}</td>
                        <td>${entity.expression}</td>
                        <td>
                            <a class="btn btn-danger btn-xs" href="/permission/delete.do?id=${entity.id}">
                                <span class="glyphicon glyphicon-trash"></span> 删除
                            </a>
                        </td>
                    </tr>
                    </#list>
            </table>
            <#include  "../common/page.ftl">
        </div>
    </div>
</div>
</body>
</html>